package com.xiaoke.service;

import com.xiaoke.entity.Category;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
public interface CategoryService {

    @RequestMapping("/category/findById")
    Category findById(@RequestParam("id") Integer id);

    @GetMapping("/category/findBrotherCategory")
    List<Category> findBrotherCategory(@RequestParam("parentId") Integer parentId, @RequestParam("currentId") Integer currentId);

    @GetMapping("/category/findByParentId")
    List<Category> findByParentId(@RequestParam("parentId") Integer parentId);

    @GetMapping("/category/findListByShop")
    List<Category> findListByShop(@RequestParam("shopId") String shopId);
}
